import { request } from '@/service/request';

/** 获取供应商容器关联关系列表 */
export function fetchGetSupplierContainerList (params?: Api.System.SupplierContainerSearchParams) {
    return request<Api.System.SupplierContainerList>({
        url: '/system/supplierContainer/list',
        method: 'get',
        params
    });
}

/** 新增供应商容器关联关系 */
export function fetchCreateSupplierContainer (data: Api.System.SupplierContainerOperateParams) {
    return request<boolean>({
        url: '/system/supplierContainer',
        method: 'post',
        data
    });
}

/** 修改供应商容器关联关系 */
export function fetchUpdateSupplierContainer (data: Api.System.SupplierContainerOperateParams) {
    return request<boolean>({
        url: '/system/supplierContainer',
        method: 'put',
        data
    });
}

/** 批量删除供应商容器关联关系 */
export function fetchBatchDeleteSupplierContainer (ids: CommonType.IdType[]) {
    return request<boolean>({
        url: `/system/supplierContainer/${ids.join(',')}`,
        method: 'delete'
    });
}
